package com.gdms.dao;

import com.gdms.entity.StudentReport;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 根据 学生id 获得信息
 * 插入信息
 * 通过 学生id 修改任务书路径
 * 通过 学生id 修改开题报告路径
 * 重置任务书路径
 * 重置开题报告路径
 * 根据 任务书路径 查找信息
 * 根据 开题报告路径 查找信息
 * 根据 学生id 修改审核状态 (1->不通过 2->通过)
 */

public interface IStudentReportDao {
	StudentReport showInfoByStudentId(int studentId);
	int addInfoByStudentId(int studentId);

	int uploadOpeningReport(@Param("studentId") int studentId,@Param("studentOpeningReport") String studentOpeningReport);
	int uploadTaskBook(@Param("studentId") int studentId,@Param("studentTaskBook") String studentTaskBook);
	int uploadFeasibilityAnalysisReport(@Param("studentId") int studentId,@Param("studentFeasibilityAnalysisReport") String studentFeasibilityAnalysisReport);
	int uploadDemandAnalysisReport(@Param("studentId") int studentId,@Param("studentDemandAnalysisReport") String studentDemandAnalysisReport);
	int uploadSummaryDesignReport(@Param("studentId") int studentId,@Param("studentSummaryDesignReport") String studentSummaryDesignReport);
	int uploadDatabaseFile(@Param("studentId") int studentId,@Param("studentDatabaseFile") String studentDatabaseFile);

	int resetOpeningReport(int studentId);
	int resetTaskBook(int studentId);
	int resetFeasibilityAnalysisReport(int studentId);
	int resetDemandAnalysisReport(int studentId);
	int resetSummaryDesignReport(int studentId);
	int resetDatabaseFile(int studentId);

	StudentReport getInfoByOpeningReportPath(String studentOpeningReport);
	StudentReport getInfoByTaskBookPath(String studentTaskBook);
	StudentReport getInfoByFeasibilityAnalysisReportPath(String studentFeasibilityAnalysisReport);
	StudentReport getInfoByDemandAnalysisReportPath(String studentDemandAnalysisReport);
	StudentReport getInfoBySummaryDesignReportPath(String studentSummaryDesignReport);
	StudentReport getInfoByDatabaseFilePath(String studentDatabaseFile);

	int passOpeningReport(@Param("studentId") int studentId,@Param("openScore") String openScore);
	int passFeasibilityAnalysisReport(@Param("studentId") int studentId,@Param("feasibilityScore") String feasibilityScore);
	int passDemandAnalysisReport(@Param("studentId") int studentId,@Param("demandScore") String demandScore);
	int passSummaryDesignReport(@Param("studentId") int studentId,@Param("summaryScore") String summaryScore);
	int passDatabaseFile(@Param("studentId") int studentId,@Param("databaseScore") String databaseScore);

	int passOpeningReport(int studentId);
	int failOpeningReport(int studentId);
	int passFeasibilityAnalysisReport(int studentId);
	int failFeasibilityAnalysisReport(int studentId);
	int passDemandAnalysisReport(int studentId);
	int failDemandAnalysisReport(int studentId);
	int passSummaryDesignReport(int studentId);
	int failSummaryDesignReport(int studentId);
	int passDatabaseFile(int studentId);
	int failDatabaseFile(int studentId);

	List<Map> showAllScores(int teacherId);
	List<StudentReport> showAllInfo();
}
